﻿SET QUOTED_IDENTIFIER ON
SET ARITHABORT ON
SET NUMERIC_ROUNDABORT OFF
SET CONCAT_NULL_YIELDS_NULL ON
SET ANSI_NULLS ON
SET ANSI_PADDING ON
SET ANSI_WARNINGS ON
GO
UPDATE
	bht_Groups
SET
	Identyficator = '{nazwa}'
FROM 
	n_Tree t
	INNER JOIN bht_Groups g ON t.id = g.Id
WHERE
	t.name = 'SYS_BLOG_CONFIGURATION' 
	AND parent = 0
GO
UPDATE
	n_Tree
SET
	name = 'ukryj_pola',
	ctime = GETDATE()
WHERE
	id =
(SELECT 
	t.id 
FROM
	n_Tree t
	INNER JOIN n_Tree tp ON t.parent = tp.id
WHERE
	tp.name = 'SYS_BLOG_CONFIGURATION'
	AND tp.parent = 0
	AND t.name = 'widoczne_pola')